Some computer applications are so large and the number of users of the applications so large that it makes sense to divide up the work of the application among multiple computers and, potentially, to store the information used by the application in many different places. Such applications are commonly referred to as distributed applications. Conventional distributed applications store shared information in multiple databases that may reside on many different computers.
Recently, however, software developers have begun to create distributed object systems. Distributed object systems comprise objects shared in computer memory and one or more processes running on one or more computers. In distributed object systems, then, an additional shared resource, the distributed object, needs to be accounted for.
Persistence of data is an important attribute in a distributed system. Data is preferably stored in a nonvolatile storage medium so that the system may be both recovered in the event of a failure and restarted in the state in which the system was shut down. A single transaction in a distributed system may update a number of items of data. If only some of the data items are persistently stored while others are not, then the state of the system may not be recoverable.
To maintain persistence in conventional distributed systems, a two-phase commit protocol is generally used to synchronize the update of multiple databases. The two-phase commit protocol assumes that the database management system will perform necessary data integrity checks. This is reasonable when databases are the focus of control between multiple applications. However, in a shared, distributed object system, the shared objects become the focus of control and more sophisticated integrity checks may be desirable.
In addition, in a distributed object environment with transparent persistence, changes to objects will be made within the context of a transaction independent of the database management system. When the transaction is completed, the order in which the state of the objects is submitted to the database may not cause efficient updates of the database, particularly where the objects are mapped to a database with different schema (e.g., objects stored in a relational database). Efficient updates may require that some writes to the database include elements of multiple objects. In addition, database integrity rules may call for some objects to be created before others can include references to them. Thus, the database facility should receive all of the object updates before beginning to perform the corresponding database update.